// 响应式样式设置
// alert(youjoin.scale);
$(function(){
	console.log("appscale");
	var menuwidth=newSize(38*2,0);
	var menuheight=newSize(28*2,0);
	var login_boxwidth=newSize(440*1.8,0);
	var login_boxheight=newSize(450*1.8,0);
	var login_peopletop=newSize(64,0);
	var login_inputwidth=newSize(315*2,0);
	var login_inputtop=newSize(48,0);
	var login_btnswidth=newSize(156*2,0);
	var login_btnsheight=newSize(54*2,0);
	var headertop=newSize(34,0);
	var login_boxtop=newSize(34,0);
	var allleft=newSize(38,0);

	var signbtnwidth=newSize(172*2,0);
	var signbtnheight=newSize(51*2,0);
	var downbtnwidth=newSize(176*2,0);
	var downbtnheight=newSize(80*2,0);
	// alert(img_dispalyleft);
	var img_width=newSize(590,0);
	var img_dispalyheight=newSize(1015,0);
	var img_dispalywidth=img_width*2+2*headertop;
	var img_dispalyleft=(window.innerWidth-img_dispalywidth)/2;
	// var img_width=(img_dispalywidth-2*headertop)/2;
	// .youjoin
	var youjoinleft=newSize(832,0);
	var youjointop=newSize(264,0);
	var youjoinwidth=newSize(254,0);
	$('.youjoin').offset({'left':youjoinleft,'top':youjointop});
	$('.youjoin').css({'width':youjoinwidth,'height':youjoinwidth});
	var youjoindivleft=newSize(906,0);
	var youjoindivtop=newSize(360,0);
	var youjoindivwidth=newSize(111,0);
	$('.youjoin div div').offset({'left':youjoindivleft,'top':youjoindivtop});
	$('.youjoin div div').css({'width':youjoindivwidth});
	// .life
	var lifeleft=newSize(600,0);
	var lifetop=newSize(554,0);
	$('.life').offset({'top':lifetop,'left':lifeleft});
	// .friend
	var friendleft=newSize(1130,0);
	var friendtop=newSize(670,0);
	$('.friend').offset({'top':friendtop,'left':friendleft});
	// alone
	var aloneleft=newSize(1550,0);
	var alonetop=newSize(440,0);
	$('.alone').offset({'top':alonetop,'left':aloneleft});


	var phone_displaytop=newSize(600,0);
	$('.phone_display').css({'margin-top':phone_displaytop+'px'});
	var footnavleft=newSize(1275,0);
	$('.foot-nav').offset({'left':footnavleft,'top':'0px'});
	var footwidth=newSize(607,0);
	$('.foot-nav').css({'width':footwidth});
	var padding10=newSize(10,0);
	$('.foot-nav ul li').css({'padding-right':'10px'});
	$('.menu').css({'width':menuwidth,'height':menuheight});
	$('.login_box').css({'width':login_boxwidth,'height':login_boxheight});
	var login_boxLeft=(window.innerWidth-login_boxwidth)/2;
	$('.login_box').offset({'top':login_boxtop,'left':login_boxLeft});
	$('header').offset({'top':headertop,'left':allleft});
	$('.sign_button button img').css({'width':signbtnwidth,'height':signbtnheight});
	$('.downbtn button').css({'width':downbtnwidth,'height':downbtnheight});
	$('.img_dispaly').css({'width':img_dispalywidth,'height':img_dispalyheight,'margin-left':img_dispalyleft+'px','margin-right':img_dispalyleft+'px'});
	$('.img_dispaly div').css({'width':img_width});
	$('.img_dispaly div img').css({'margin-bottom':headertop+'px'});
	// alert(headertop+img_dispalyleft+"and"+img_dispalyleft);
	$('.img1').offset({'top':"0px",'left':Number(headertop)+Number(img_dispalyleft)});
	$('.img2').offset({'top':"100px",'left':Number(headertop)*2+Number(img_width)+Number(img_dispalyleft)});
	// alert(Number(headertop)*2+Number(img_width));
	$('.people_img').css({'margin-top':login_peopletop+'px'});
	$('.people_img img').css({'width':signbtnheight});
	$('.login_inputs input').css({'width':login_inputwidth,'margin-left':(login_boxwidth-login_inputwidth)/2+'px','margin-top':login_inputtop+'px'});
	$('.login_btns').css({'margin-top':login_inputtop+'px'});
	$('.login_btns div').css({'width':login_btnswidth*2+2,'height':login_btnsheight,'margin-left':(login_boxwidth-login_btnswidth*2-2)/2+'px'});
	$('.login_btns div button').css({'width':login_btnswidth,'height':login_btnsheight});
	$('.login_btns  div button').click(function(){
		$('.login_btns button').css({'background-color':'#716f73'});
		$(this).css({'background-color':'#dea531','border-radius':'5px'});
	});
	$('.youjoinfoot').css({'padding-left':allleft+'px','padding-right':allleft+'px'});
	$('.foot-bottom span').offset({'left':allleft});
});
function newSize(oldsize,point){
	return (youjoin.appscale*oldsize).toFixed(point);
}